<?php


class otherClassAction extends Action
{
    public function getCompanySignAjax()
    {
        $mid = $this->request('mid');
        if(empty($mid)) $this->msg(300,'error');
        $info = m("flow_log")->getone('mid='.$mid.' and `status` = 1 and `courseid` = 112 and `table` = \'zbcg_new\'', 'checkid');
        if(empty($info)) $this->msg(300,'error');
        $signPath = '';
        $signPath = m('option')->getval('signature_'.$info['checkid']);
        if(empty($signPath)) $this->msg(300,'error');;
        $this->msg(200,'success', array('path' => $signPath));
    }

    public function getDirectorAjax()
    {
        $name = $this->request('director');
        if(empty($name)) $this->msg(300,'error');
        $info = m('admin')->getone('`deptname`=\''.$name.'\' and `ranking` = \'项目负责人\'', 'name');
//        echo m('admin')->getLastSql();
        if(empty($info)) $this->msg(300,'error');;
        $this->msg(200,'success', array('director' => $info['name']));
    }
}